fix(propagation): ensure we delete pending folders before terminating
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 25 Apr 2025 12:00:30 +0000 (14:00 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 28 Apr 2025 09:46:41 +0000 (09:46 +0000)
we might forget to run the pending folder deletions when terminating
synchronization

ensure we check if any of them are to be done

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/owncloudpropagator.cpp

index b89e203fcd58ebf263bea392093ab3e285549e43..0e67c28ea348fbbd2a43997dd6c543e233c7f517 100644 (file)
@@ -1611,6 +1611,11 @@ void PropagateRootDirectory::slotSubJobsFinished(SyncFileItem::Status status)
         return;
     }
 
+    if (!_dirDeletionJobs._jobsToDo.empty()) {
+        _dirDeletionJobs.scheduleSelfOrChild();
+        return;
+    }
+
     if (status != SyncFileItem::Success
         && status != SyncFileItem::Restoration
         && status != SyncFileItem::BlacklistedError